﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Media;
using System.Text;
using System.Threading.Tasks;
using 坦克大战.Properties;

namespace 坦克大战
{
    internal class SoundManager
    {
        private static SoundPlayer startPlayer =new SoundPlayer();
        private static SoundPlayer addPlayer = new SoundPlayer();
        private static SoundPlayer blastPlayer = new SoundPlayer();
        private static SoundPlayer hitPlayer = new SoundPlayer();
        private static SoundPlayer firPlayer = new SoundPlayer();
        // private static SoundPlayer startPlayer = new SoundPlayer();
        // private static SoundPlayer startPlayer = new SoundPlayer();

        public static void InitSound()
        {
            startPlayer.Stream = Resources.start;
            addPlayer.Stream = Resources.add;
            blastPlayer.Stream = Resources.start;
            hitPlayer.Stream = Resources.hit;
            firPlayer.Stream = Resources.fire;
        }
        public static void PlayStart()
        {

            startPlayer.Play();
        }
        public static void PlayAdd()
        {

            addPlayer.Play();
        }
        public static void PlayBlast()
        {

            blastPlayer.Play();
        }
        public static void PlayHit()
        {

            hitPlayer.Play();
        }
        public static void PlayFir()
        {

            firPlayer.Play();
        }
    }
}
